package net.huashitong.user.service;

import java.util.List;

import net.huashitong.user.dao.DynamicDao;
import net.huashitong.user.entity.Dynamic;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
@Service
public class DynamicService extends StringPKService<Dynamic> {

	@Autowired
	private DynamicDao dao;
	@Autowired
	private SysTableService tableService;
	@Override
	protected BaseDao<Dynamic, String> getDao() {
		// TODO Auto-generated method stub
		return dao;
	}
	@Override
	protected void beforeSave(Dynamic dynamic) {
		dynamic.setSysId(tableService.updateMaxSysId("t_gis_dynamic", null));
	}
	public List<Dynamic> queryOrderDate() {
		return dao.queryOrderDate();
	}

}
